package povos;

import java.math.BigDecimal;
import java.math.RoundingMode;

import com.gg.entity.Fruit;
import com.gg.entity.Star;
import com.gg.entity.User;

public class StarFruitPovo {
	private Star star;
	private Fruit fruit;
	private User user;
	public BigDecimal getTotal() {
		BigDecimal price =fruit.getFprice();
		BigDecimal count=new BigDecimal(star.getScount().toString());
		return price.multiply(count).setScale(2, RoundingMode.UP);
		
	}
	public StarFruitPovo(Star star, Fruit fruit, User user) {
		super();
		this.star = star;
		this.fruit = fruit;
		this.user = user;
	}

	public StarFruitPovo(Fruit fruit, User user) {
		super();
		this.fruit = fruit;
		this.user = user;
	}

	public StarFruitPovo() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString() {
		return "StarFruitPovo []";
	}

	public Star getStar() {
		return star;
	}

	public void setStar(Star star) {
		this.star = star;
	}

	public Fruit getFruit() {
		return fruit;
	}

	public void setFruit(Fruit fruit) {
		this.fruit = fruit;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}
